<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="com.qianfeng.pojo.Friender" %>
<%@ page import="com.qianfeng.pojo.Address" %><%--
  Created by IntelliJ IDEA.
  User: jackiechan
  Date: 2021/9/1
  Time: 09:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%
    int[] ids = new int[]{1, 2, 3, 4, 5, 10, 18, 19, 43};
    request.setAttribute("suoyouid",ids);

    List<Integer> list = new ArrayList<>();
    list.add(190);
    list.add(4123);
    list.add(42);
    list.add(195230);
    list.add(142390);
    list.add(15235290);
    list.add(192342350);
    request.setAttribute("list",list);


    Map map = new HashMap();
    map.put("name", "wyf");
    map.put("des", "别人都是白富美");

    Friender friender = new Friender();
    friender.setGender("女");
    friender.setAge(70);
    friender.setName("专业找小哥哥50年");
    friender.setDescription("肤白貌美");
    Address address = new Address();
    address.setAddress("园墅别墅区");
    friender.setAddress(address);
    map.put("nvpengyou", friender);


    request.setAttribute("map",map);
%>



------从数组中获取指定位置的数据--------<br>
${suoyouid[0]} <br>
${suoyouid[6]} <br>
${suoyouid[60]} <br>
------从集合中获取指定位置的数据--------<br>
${list[0]}<br>
${list[3]}<br>
${list[6]}<br>
${list[12]}<br>
<br>
------从map中获取指定位置的数据--------<br>
${map.name}
<br>
${map.des}
<br>
${map.nvpengyou.name}<br>
${map.nvpengyou.age}<br>
${map.nvpengyou.address.address}<br>
<br>
</body>
</html>
